<link type="text/css" href="<?php echo base_url();?>assets/js/development-bundle/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo base_url();?>assets/js/development-bundle/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/development-bundle/ui/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/development-bundle/ui/jquery.ui.widget.js"></script>
<script language="javascript">
	function back(){
		document.location="<?php echo site_url("/sp_mahasiswa/index/" . $id); ?>";
	}
	$(document).ready(function(){
		$(".tgl").datepicker({
			changeMonth: true,
			changeYear: true,
			monthNamesShort: [ "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "Nopember", "Desember" ],
			dayNames: [ "Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu" ],
			dayNamesMin: [ "M", "S", "S", "R", "K", "J", "S" ],
			// showOn: "button",
			dateFormat:"dd-mm-yy",
			// buttonImage: "<?php echo base_url(); ?>assets/images/calendar.gif",
			buttonImageOnly: true
		});
	});
</script>
<?php
echo form_open("/sp_mahasiswa/form_sp/" . $id . "/" . $parameter, array("name"=>"form_sp","id"=>"medic_form"));
if($parameter == FALSE){
	$tgl_sp	= set_value("tgl_sp");
	$ket	= set_value("ket");
} else {
	$tgl_sp	= date("d-m-Y",strtotime($value["TANGGAL_SP"]));
	$ket	= $value["KETERANGAN"];
}
?>
<p>
	<label>Tanggal SP</label>
	<input type="text" name="tgl_sp" value="<?php echo $tgl_sp; ?>" class="tgl">
	<?php echo form_error("tgl_sp"); ?>
</p>
<p>
	<label>Keterangan</label>
	<textarea name="ket"><?php echo $ket; ?></textarea>
	<?php echo form_error("ket"); ?>
</p>
<p>
	<input type="submit" class="btn btn-primary" id="submit" value="Simpan">
	<input type="reset" class="btn btn-primary" id="submit" value="Reset">
	<input type="button" class="btn btn-primary" id="submit" value="Kembali" onClick="back()">
</p>
<?php echo form_close(); ?>